{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Pandas 内置的属性和方法"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "car_sales = pd.read_csv('car-sales.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Make             object\n",
       "Colour           object\n",
       "Odometer (KM)     int64\n",
       "Doors             int64\n",
       "Price            object\n",
       "dtype: object"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "car_sales.dtypes"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "返回一个列表"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Index(['Make', 'Colour', 'Odometer (KM)', 'Doors', 'Price'], dtype='object')"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "car_sales.columns"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "查看数据的估计量值，均值，最大值，最小值，标准差等"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Odometer (KM)</th>\n",
       "      <th>Doors</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>10.000000</td>\n",
       "      <td>10.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>78601.400000</td>\n",
       "      <td>4.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>61983.471735</td>\n",
       "      <td>0.471405</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>11179.000000</td>\n",
       "      <td>3.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>35836.250000</td>\n",
       "      <td>4.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>57369.000000</td>\n",
       "      <td>4.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>96384.500000</td>\n",
       "      <td>4.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>213095.000000</td>\n",
       "      <td>5.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       Odometer (KM)      Doors\n",
       "count      10.000000  10.000000\n",
       "mean    78601.400000   4.000000\n",
       "std     61983.471735   0.471405\n",
       "min     11179.000000   3.000000\n",
       "25%     35836.250000   4.000000\n",
       "50%     57369.000000   4.000000\n",
       "75%     96384.500000   4.000000\n",
       "max    213095.000000   5.000000"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "car_sales.describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 10 entries, 0 to 9\n",
      "Data columns (total 5 columns):\n",
      " #   Column         Non-Null Count  Dtype \n",
      "---  ------         --------------  ----- \n",
      " 0   Make           10 non-null     object\n",
      " 1   Colour         10 non-null     object\n",
      " 2   Odometer (KM)  10 non-null     int64 \n",
      " 3   Doors          10 non-null     int64 \n",
      " 4   Price          10 non-null     object\n",
      "dtypes: int64(2), object(3)\n",
      "memory usage: 528.0+ bytes\n"
     ]
    }
   ],
   "source": [
    "car_sales.info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\hp\\AppData\\Local\\Temp\\ipykernel_2796\\4073448239.py:1: FutureWarning: Dropping of nuisance columns in DataFrame reductions (with 'numeric_only=None') is deprecated; in a future version this will raise TypeError.  Select only valid columns before calling the reduction.\n",
      "  car_sales.mean()\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "Odometer (KM)    78601.4\n",
       "Doors                4.0\n",
       "dtype: float64"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "car_sales.mean()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2000.0"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "car_prices = pd.Series([1000,2000,3000])\n",
    "car_prices.mean()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Make             ToyotaHondaToyotaBMWNissanToyotaHondaHondaToyo...\n",
       "Colour               WhiteRedBlueBlackWhiteGreenBlueBlueWhiteWhite\n",
       "Odometer (KM)                                               786014\n",
       "Doors                                                           40\n",
       "Price            $4,000.00$5,000.00$7,000.00$22,000.00$3,500.00...\n",
       "dtype: object"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "car_sales.sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "40"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "car_sales[\"Doors\"].sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "10"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(car_sales)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Make</th>\n",
       "      <th>Colour</th>\n",
       "      <th>Odometer (KM)</th>\n",
       "      <th>Doors</th>\n",
       "      <th>Price</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Toyota</td>\n",
       "      <td>White</td>\n",
       "      <td>150043</td>\n",
       "      <td>4</td>\n",
       "      <td>$4,000.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Honda</td>\n",
       "      <td>Red</td>\n",
       "      <td>87899</td>\n",
       "      <td>4</td>\n",
       "      <td>$5,000.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Toyota</td>\n",
       "      <td>Blue</td>\n",
       "      <td>32549</td>\n",
       "      <td>3</td>\n",
       "      <td>$7,000.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>BMW</td>\n",
       "      <td>Black</td>\n",
       "      <td>11179</td>\n",
       "      <td>5</td>\n",
       "      <td>$22,000.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Nissan</td>\n",
       "      <td>White</td>\n",
       "      <td>213095</td>\n",
       "      <td>4</td>\n",
       "      <td>$3,500.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>Toyota</td>\n",
       "      <td>Green</td>\n",
       "      <td>99213</td>\n",
       "      <td>4</td>\n",
       "      <td>$4,500.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>Honda</td>\n",
       "      <td>Blue</td>\n",
       "      <td>45698</td>\n",
       "      <td>4</td>\n",
       "      <td>$7,500.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>Honda</td>\n",
       "      <td>Blue</td>\n",
       "      <td>54738</td>\n",
       "      <td>4</td>\n",
       "      <td>$7,000.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>Toyota</td>\n",
       "      <td>White</td>\n",
       "      <td>60000</td>\n",
       "      <td>4</td>\n",
       "      <td>$6,250.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>Nissan</td>\n",
       "      <td>White</td>\n",
       "      <td>31600</td>\n",
       "      <td>4</td>\n",
       "      <td>$9,700.00</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     Make Colour  Odometer (KM)  Doors       Price\n",
       "0  Toyota  White         150043      4   $4,000.00\n",
       "1   Honda    Red          87899      4   $5,000.00\n",
       "2  Toyota   Blue          32549      3   $7,000.00\n",
       "3     BMW  Black          11179      5  $22,000.00\n",
       "4  Nissan  White         213095      4   $3,500.00\n",
       "5  Toyota  Green          99213      4   $4,500.00\n",
       "6   Honda   Blue          45698      4   $7,500.00\n",
       "7   Honda   Blue          54738      4   $7,000.00\n",
       "8  Toyota  White          60000      4   $6,250.00\n",
       "9  Nissan  White          31600      4   $9,700.00"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "car_sales"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "既是 position 也是 index"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0      dog\n",
       "1      cat\n",
       "2    tiger\n",
       "3    panda\n",
       "4    snake\n",
       "dtype: object"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "animals = pd.Series([\"dog\", \"cat\", \"tiger\",\"panda\",\"snake\"])\n",
    "animals"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "上面这个例子，我们创建了一个Series，其中的【0、1、2、3....】是animals中的索引值，代表了其中的每一个元素在animals中的位置，那我们能不能修改其索引值呢？"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2       dog\n",
       "4       cat\n",
       "2     tiger\n",
       "8     panda\n",
       "10    snake\n",
       "dtype: object"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "animals_indexed = pd.Series([\"dog\", \"cat\", \"tiger\",\"panda\",\"snake\"], index=[2,4,2,8,10])\n",
    "animals_indexed"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "如此，通过传入index参数，我们修改了animals_indexed的索引值，如果我们要定位某一个索引位置的数据，该怎么办呢？"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2      dog\n",
       "2    tiger\n",
       "dtype: object"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "animals_indexed.loc[2]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "怎么回事？为什么有两个值？因为，我们刚刚修改了animals_indexed的索引值，其中dog和tiger的索引值都被设置成了2，所以结果是两个。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "但是，你可能会想，那我如果不想这样，只想通过元素在集合中的位置，去获取数据呢？"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'tiger'"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "animals_indexed.iloc[2]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "答案就是iloc方法。iloc不关心index，只看元素在集合中的具体position位置。好了，那如果index和positon是一样的呢？那当然是loc和iloc返回的结果都是一样的了"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "LOC 包含最后一个数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Make</th>\n",
       "      <th>Colour</th>\n",
       "      <th>Odometer (KM)</th>\n",
       "      <th>Doors</th>\n",
       "      <th>Price</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Toyota</td>\n",
       "      <td>White</td>\n",
       "      <td>150043</td>\n",
       "      <td>4</td>\n",
       "      <td>$4,000.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Honda</td>\n",
       "      <td>Red</td>\n",
       "      <td>87899</td>\n",
       "      <td>4</td>\n",
       "      <td>$5,000.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Toyota</td>\n",
       "      <td>Blue</td>\n",
       "      <td>32549</td>\n",
       "      <td>3</td>\n",
       "      <td>$7,000.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>BMW</td>\n",
       "      <td>Black</td>\n",
       "      <td>11179</td>\n",
       "      <td>5</td>\n",
       "      <td>$22,000.00</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     Make Colour  Odometer (KM)  Doors       Price\n",
       "0  Toyota  White         150043      4   $4,000.00\n",
       "1   Honda    Red          87899      4   $5,000.00\n",
       "2  Toyota   Blue          32549      3   $7,000.00\n",
       "3     BMW  Black          11179      5  $22,000.00"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "car_sales.loc[:3]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "ILOC 不包含最后一个数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Make</th>\n",
       "      <th>Colour</th>\n",
       "      <th>Odometer (KM)</th>\n",
       "      <th>Doors</th>\n",
       "      <th>Price</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Toyota</td>\n",
       "      <td>White</td>\n",
       "      <td>150043</td>\n",
       "      <td>4</td>\n",
       "      <td>$4,000.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Honda</td>\n",
       "      <td>Red</td>\n",
       "      <td>87899</td>\n",
       "      <td>4</td>\n",
       "      <td>$5,000.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Toyota</td>\n",
       "      <td>Blue</td>\n",
       "      <td>32549</td>\n",
       "      <td>3</td>\n",
       "      <td>$7,000.00</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     Make Colour  Odometer (KM)  Doors      Price\n",
       "0  Toyota  White         150043      4  $4,000.00\n",
       "1   Honda    Red          87899      4  $5,000.00\n",
       "2  Toyota   Blue          32549      3  $7,000.00"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "car_sales.iloc[:3]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "如上图，loc和iloc还有一点差别，就是在做数据切片的时候，loc函数返回的是包含最右侧索引值的，而iloc则不包括。换句话，loc的切片索引是做闭右闭，而iloc是做闭右开。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "好！接下来让我们看看如何查询、过滤数据中的某一列。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    Toyota\n",
       "1     Honda\n",
       "2    Toyota\n",
       "3       BMW\n",
       "4    Nissan\n",
       "5    Toyota\n",
       "6     Honda\n",
       "7     Honda\n",
       "8    Toyota\n",
       "9    Nissan\n",
       "Name: Make, dtype: object"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "car_sales[\"Make\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    Toyota\n",
       "1     Honda\n",
       "2    Toyota\n",
       "3       BMW\n",
       "4    Nissan\n",
       "5    Toyota\n",
       "6     Honda\n",
       "7     Honda\n",
       "8    Toyota\n",
       "9    Nissan\n",
       "Name: Make, dtype: object"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "car_sales.Make"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "我们不仅可以通过[\"column_name\"]或者是.column_name的方式，获得某一列的数据，还能向下面这样，通过条件过滤数据，比如我们要查看car_sales中“make”厂商是“Toyota”的数据。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Make</th>\n",
       "      <th>Colour</th>\n",
       "      <th>Odometer (KM)</th>\n",
       "      <th>Doors</th>\n",
       "      <th>Price</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Toyota</td>\n",
       "      <td>White</td>\n",
       "      <td>150043</td>\n",
       "      <td>4</td>\n",
       "      <td>$4,000.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Toyota</td>\n",
       "      <td>Blue</td>\n",
       "      <td>32549</td>\n",
       "      <td>3</td>\n",
       "      <td>$7,000.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>Toyota</td>\n",
       "      <td>Green</td>\n",
       "      <td>99213</td>\n",
       "      <td>4</td>\n",
       "      <td>$4,500.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>Toyota</td>\n",
       "      <td>White</td>\n",
       "      <td>60000</td>\n",
       "      <td>4</td>\n",
       "      <td>$6,250.00</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     Make Colour  Odometer (KM)  Doors      Price\n",
       "0  Toyota  White         150043      4  $4,000.00\n",
       "2  Toyota   Blue          32549      3  $7,000.00\n",
       "5  Toyota  Green          99213      4  $4,500.00\n",
       "8  Toyota  White          60000      4  $6,250.00"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "car_sales[car_sales[\"Make\"] == \"Toyota\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Make</th>\n",
       "      <th>Colour</th>\n",
       "      <th>Odometer (KM)</th>\n",
       "      <th>Doors</th>\n",
       "      <th>Price</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Toyota</td>\n",
       "      <td>White</td>\n",
       "      <td>150043</td>\n",
       "      <td>4</td>\n",
       "      <td>$4,000.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Honda</td>\n",
       "      <td>Red</td>\n",
       "      <td>87899</td>\n",
       "      <td>4</td>\n",
       "      <td>$5,000.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Toyota</td>\n",
       "      <td>Blue</td>\n",
       "      <td>32549</td>\n",
       "      <td>3</td>\n",
       "      <td>$7,000.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>BMW</td>\n",
       "      <td>Black</td>\n",
       "      <td>11179</td>\n",
       "      <td>5</td>\n",
       "      <td>$22,000.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Nissan</td>\n",
       "      <td>White</td>\n",
       "      <td>213095</td>\n",
       "      <td>4</td>\n",
       "      <td>$3,500.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>Toyota</td>\n",
       "      <td>Green</td>\n",
       "      <td>99213</td>\n",
       "      <td>4</td>\n",
       "      <td>$4,500.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>Honda</td>\n",
       "      <td>Blue</td>\n",
       "      <td>45698</td>\n",
       "      <td>4</td>\n",
       "      <td>$7,500.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>Honda</td>\n",
       "      <td>Blue</td>\n",
       "      <td>54738</td>\n",
       "      <td>4</td>\n",
       "      <td>$7,000.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>Toyota</td>\n",
       "      <td>White</td>\n",
       "      <td>60000</td>\n",
       "      <td>4</td>\n",
       "      <td>$6,250.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>Nissan</td>\n",
       "      <td>White</td>\n",
       "      <td>31600</td>\n",
       "      <td>4</td>\n",
       "      <td>$9,700.00</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     Make Colour  Odometer (KM)  Doors       Price\n",
       "0  Toyota  White         150043      4   $4,000.00\n",
       "1   Honda    Red          87899      4   $5,000.00\n",
       "2  Toyota   Blue          32549      3   $7,000.00\n",
       "3     BMW  Black          11179      5  $22,000.00\n",
       "4  Nissan  White         213095      4   $3,500.00\n",
       "5  Toyota  Green          99213      4   $4,500.00\n",
       "6   Honda   Blue          45698      4   $7,500.00\n",
       "7   Honda   Blue          54738      4   $7,000.00\n",
       "8  Toyota  White          60000      4   $6,250.00\n",
       "9  Nissan  White          31600      4   $9,700.00"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "car_sales"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "之前，我们讲过了如何查看单列数据，那如果我想拿两列数据出来，然后做一下对比，该怎么办呢？"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>Doors</th>\n",
       "      <th>3</th>\n",
       "      <th>4</th>\n",
       "      <th>5</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Make</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>BMW</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Honda</th>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Nissan</th>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Toyota</th>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "Doors   3  4  5\n",
       "Make           \n",
       "BMW     0  0  1\n",
       "Honda   0  3  0\n",
       "Nissan  0  2  0\n",
       "Toyota  1  3  0"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.crosstab(car_sales[\"Make\"], car_sales[\"Doors\"])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "这个方法其实有点类似于sql中的groupby，根据某一列的值对数据进行分组，比如这里，就是根据后面的cal_sales[\"Doors\"]中的数据，对Make进行分组。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Doors列的数据中，一个只有三种数据——「3、4、5」。当Doors=3的时候，Make中只有一个Toyota，同理当Doors=4的时候，有3个Honda、2个Nissan和1个Toyota。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "groupby"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Odometer (KM)</th>\n",
       "      <th>Doors</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Make</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>BMW</th>\n",
       "      <td>11179.000000</td>\n",
       "      <td>5.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Honda</th>\n",
       "      <td>62778.333333</td>\n",
       "      <td>4.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Nissan</th>\n",
       "      <td>122347.500000</td>\n",
       "      <td>4.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Toyota</th>\n",
       "      <td>85451.250000</td>\n",
       "      <td>3.75</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        Odometer (KM)  Doors\n",
       "Make                        \n",
       "BMW      11179.000000   5.00\n",
       "Honda    62778.333333   4.00\n",
       "Nissan  122347.500000   4.00\n",
       "Toyota   85451.250000   3.75"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "car_sales.groupby(\"Make\").mean()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [],
   "source": [
    "%matplotlib inline\n",
    "import  matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<AxesSubplot:>"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAD4CAYAAADy46FuAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAA2HUlEQVR4nO3deXxU9bn48c+TnSwEsoIJEEICBEFRIqK4gwpqRay22Fa593qLtVpb23td67Wtdb1Vr9alpcp1+bVWRa3e1o1FRVHRuLEImYRFCZBJICyTAFmf3x9zhg4YJoEsZ2byvF+veWXyPed75sm8kjxzvquoKsYYY8zBxLgdgDHGmPBmicIYY0xIliiMMcaEZInCGGNMSJYojDHGhBTndgDdLSsrSwsKCtwOwxhjIsonn3yyVVWz2zsWdYmioKCAsrIyt8MwxpiIIiJfHeyYNT0ZY4wJyRKFMcaYkCxRGGOMCckShTHGmJAsURhjjAnJEoUxxpiQLFEYY4wJyRKFMZ2wbN02Vm7a6XYYxrjCEoUxnXDdC8u5/oXlbodhjCuibma2Md1td1MLX23bDcCWnXsYnN7P5YiM6V12R2FMByq89fueL1xd42IkxrjDEoUxHSj3+gBIS4xj0Wqvy9EY0/ssURjTAU+1j8S4GL49IZ/3K7fR0NjidkjG9CpLFMZ0wFNTT3FuKmcfOYim1jberah1OyRjepUlCmM64Kn2MTI3jdKCgfRPirN+CtPnWKIwJoSdu5up3rWXUblpxMfGcProHBavqaG1Td0OzZheY4nCmBA8Nf6O7JG5aQBMLcmlrqGJz77e7mZYxvQqSxTGhFBe7SSKQf5EceqobOJixJqfTJ/SYaIQkSEi8paIrBaRVSLyU6c8Q0QWiEiF83VgUJ0bRaRSRMpF5Oyg8gkissI59qCIiFOeKCLPOuXLRKQgqM5s5zUqRGR2t/70xnSgwusjNTGOI9KTAOifFM/xhRkstGGypg/pz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iMsopmgJ86WJIbvsamCQiyc7fzRSisHM/zu0AwoGqtojI1cAb+EctzFPVVS6H5abJwKXAChH53Cm7SVVfdS8kE0Z+AvzZ+VC1DvhXl+NxjaouE5H5wKf4Rwt+RhQu52FLeBhjjAnJmp6MMcaEZInCGGNMSJYojDHGhGSJwhhjTEiWKIwxxoRkicIYY0xIliiMMcaE9P8BhYT9rjI8bRQAAAAASUVORK5CYII=",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "car_sales[\"Odometer (KM)\"].plot()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "看上面，查看car_sales我们可以知道，car_sales[\"Odometer (KM)\"]这一列数据是数值型的，所以我们可以调用plot()方法，查看其趋势图。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Make</th>\n",
       "      <th>Colour</th>\n",
       "      <th>Odometer (KM)</th>\n",
       "      <th>Doors</th>\n",
       "      <th>Price</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Toyota</td>\n",
       "      <td>White</td>\n",
       "      <td>150043</td>\n",
       "      <td>4</td>\n",
       "      <td>$4,000.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Honda</td>\n",
       "      <td>Red</td>\n",
       "      <td>87899</td>\n",
       "      <td>4</td>\n",
       "      <td>$5,000.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Toyota</td>\n",
       "      <td>Blue</td>\n",
       "      <td>32549</td>\n",
       "      <td>3</td>\n",
       "      <td>$7,000.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>BMW</td>\n",
       "      <td>Black</td>\n",
       "      <td>11179</td>\n",
       "      <td>5</td>\n",
       "      <td>$22,000.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Nissan</td>\n",
       "      <td>White</td>\n",
       "      <td>213095</td>\n",
       "      <td>4</td>\n",
       "      <td>$3,500.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>Toyota</td>\n",
       "      <td>Green</td>\n",
       "      <td>99213</td>\n",
       "      <td>4</td>\n",
       "      <td>$4,500.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>Honda</td>\n",
       "      <td>Blue</td>\n",
       "      <td>45698</td>\n",
       "      <td>4</td>\n",
       "      <td>$7,500.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>Honda</td>\n",
       "      <td>Blue</td>\n",
       "      <td>54738</td>\n",
       "      <td>4</td>\n",
       "      <td>$7,000.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>Toyota</td>\n",
       "      <td>White</td>\n",
       "      <td>60000</td>\n",
       "      <td>4</td>\n",
       "      <td>$6,250.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>Nissan</td>\n",
       "      <td>White</td>\n",
       "      <td>31600</td>\n",
       "      <td>4</td>\n",
       "      <td>$9,700.00</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     Make Colour  Odometer (KM)  Doors       Price\n",
       "0  Toyota  White         150043      4   $4,000.00\n",
       "1   Honda    Red          87899      4   $5,000.00\n",
       "2  Toyota   Blue          32549      3   $7,000.00\n",
       "3     BMW  Black          11179      5  $22,000.00\n",
       "4  Nissan  White         213095      4   $3,500.00\n",
       "5  Toyota  Green          99213      4   $4,500.00\n",
       "6   Honda   Blue          45698      4   $7,500.00\n",
       "7   Honda   Blue          54738      4   $7,000.00\n",
       "8  Toyota  White          60000      4   $6,250.00\n",
       "9  Nissan  White          31600      4   $9,700.00"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "car_sales"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "还记得car_sales[\"Price\"]这列数据吗？因为数字中混入了$等其它符号，所以它并非数值类型，而是Object，问题是对于非数值类型的数据，我们还能画图么？"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "不能 尝试 car_sales[\"Price\"].plot()  报错，只能转换类型了"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\hp\\AppData\\Local\\Temp\\ipykernel_2796\\1685662463.py:1: FutureWarning: The default value of regex will change from True to False in a future version.\n",
      "  car_sales[\"Price\"] = car_sales[\"Price\"].str.replace(\"[\\$\\,\\.]\",\"\").astype(int)\n"
     ]
    }
   ],
   "source": [
    "car_sales[\"Price\"] = car_sales[\"Price\"].str.replace(\"[\\$\\,\\.]\",\"\").astype(int)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Make</th>\n",
       "      <th>Colour</th>\n",
       "      <th>Odometer (KM)</th>\n",
       "      <th>Doors</th>\n",
       "      <th>Price</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Toyota</td>\n",
       "      <td>White</td>\n",
       "      <td>150043</td>\n",
       "      <td>4</td>\n",
       "      <td>400000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Honda</td>\n",
       "      <td>Red</td>\n",
       "      <td>87899</td>\n",
       "      <td>4</td>\n",
       "      <td>500000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Toyota</td>\n",
       "      <td>Blue</td>\n",
       "      <td>32549</td>\n",
       "      <td>3</td>\n",
       "      <td>700000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>BMW</td>\n",
       "      <td>Black</td>\n",
       "      <td>11179</td>\n",
       "      <td>5</td>\n",
       "      <td>2200000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Nissan</td>\n",
       "      <td>White</td>\n",
       "      <td>213095</td>\n",
       "      <td>4</td>\n",
       "      <td>350000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>Toyota</td>\n",
       "      <td>Green</td>\n",
       "      <td>99213</td>\n",
       "      <td>4</td>\n",
       "      <td>450000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>Honda</td>\n",
       "      <td>Blue</td>\n",
       "      <td>45698</td>\n",
       "      <td>4</td>\n",
       "      <td>750000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>Honda</td>\n",
       "      <td>Blue</td>\n",
       "      <td>54738</td>\n",
       "      <td>4</td>\n",
       "      <td>700000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>Toyota</td>\n",
       "      <td>White</td>\n",
       "      <td>60000</td>\n",
       "      <td>4</td>\n",
       "      <td>625000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>Nissan</td>\n",
       "      <td>White</td>\n",
       "      <td>31600</td>\n",
       "      <td>4</td>\n",
       "      <td>970000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     Make Colour  Odometer (KM)  Doors    Price\n",
       "0  Toyota  White         150043      4   400000\n",
       "1   Honda    Red          87899      4   500000\n",
       "2  Toyota   Blue          32549      3   700000\n",
       "3     BMW  Black          11179      5  2200000\n",
       "4  Nissan  White         213095      4   350000\n",
       "5  Toyota  Green          99213      4   450000\n",
       "6   Honda   Blue          45698      4   750000\n",
       "7   Honda   Blue          54738      4   700000\n",
       "8  Toyota  White          60000      4   625000\n",
       "9  Nissan  White          31600      4   970000"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "car_sales"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<AxesSubplot:>"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEDCAYAAAA7jc+ZAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAs90lEQVR4nO3deXxcd3nv8c+jzdpGkm1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oD4BWRmtCmdwJvOFiS044Dl4pIfuj35p2k4MXpLKcLiAZVHRSRu4CtBK+ab1bVeofLctIVwK3ALhGpC237kqpuca4kk0A+DTwcOik6DNzucD2OUdVXROTnwGsEu9VeJwWnQ7ApEIwxJsWlytCNMcaYMVjQG2NMirOgN8aYFGdBb4wxKc6C3hhjUpwFvTHGpDgLemOMSXH/H7W5y2aDQm4wAAAAAElFTkSuQmCC",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "car_sales[\"Price\"].plot()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "看上面，我们通过正则表达式的语法，替换了Price列中的[$,.]，将其变为一个纯数字的字符串，然后再调用astype方法，将其转为一个int类型的数值，最后成功调用plot方法。\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "pandas 操作数据"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "有这样一个需求——如何将car_sales中的“Make”列变为小写？"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Make</th>\n",
       "      <th>Colour</th>\n",
       "      <th>Odometer (KM)</th>\n",
       "      <th>Doors</th>\n",
       "      <th>Price</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>toyota</td>\n",
       "      <td>White</td>\n",
       "      <td>150043</td>\n",
       "      <td>4</td>\n",
       "      <td>400000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>honda</td>\n",
       "      <td>Red</td>\n",
       "      <td>87899</td>\n",
       "      <td>4</td>\n",
       "      <td>500000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>toyota</td>\n",
       "      <td>Blue</td>\n",
       "      <td>32549</td>\n",
       "      <td>3</td>\n",
       "      <td>700000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>bmw</td>\n",
       "      <td>Black</td>\n",
       "      <td>11179</td>\n",
       "      <td>5</td>\n",
       "      <td>2200000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>nissan</td>\n",
       "      <td>White</td>\n",
       "      <td>213095</td>\n",
       "      <td>4</td>\n",
       "      <td>350000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>toyota</td>\n",
       "      <td>Green</td>\n",
       "      <td>99213</td>\n",
       "      <td>4</td>\n",
       "      <td>450000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>honda</td>\n",
       "      <td>Blue</td>\n",
       "      <td>45698</td>\n",
       "      <td>4</td>\n",
       "      <td>750000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>honda</td>\n",
       "      <td>Blue</td>\n",
       "      <td>54738</td>\n",
       "      <td>4</td>\n",
       "      <td>700000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>toyota</td>\n",
       "      <td>White</td>\n",
       "      <td>60000</td>\n",
       "      <td>4</td>\n",
       "      <td>625000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>nissan</td>\n",
       "      <td>White</td>\n",
       "      <td>31600</td>\n",
       "      <td>4</td>\n",
       "      <td>970000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     Make Colour  Odometer (KM)  Doors    Price\n",
       "0  toyota  White         150043      4   400000\n",
       "1   honda    Red          87899      4   500000\n",
       "2  toyota   Blue          32549      3   700000\n",
       "3     bmw  Black          11179      5  2200000\n",
       "4  nissan  White         213095      4   350000\n",
       "5  toyota  Green          99213      4   450000\n",
       "6   honda   Blue          45698      4   750000\n",
       "7   honda   Blue          54738      4   700000\n",
       "8  toyota  White          60000      4   625000\n",
       "9  nissan  White          31600      4   970000"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "car_sales[\"Make\"] = car_sales[\"Make\"].str.lower()\n",
    "car_sales"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Make</th>\n",
       "      <th>Colour</th>\n",
       "      <th>Odometer (KM)</th>\n",
       "      <th>Doors</th>\n",
       "      <th>Price</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Toyota</td>\n",
       "      <td>White</td>\n",
       "      <td>150043.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>$4,000.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Honda</td>\n",
       "      <td>Red</td>\n",
       "      <td>87899.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>$5,000.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Toyota</td>\n",
       "      <td>Blue</td>\n",
       "      <td>32549.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>$7,000.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>BMW</td>\n",
       "      <td>Black</td>\n",
       "      <td>11179.0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Nissan</td>\n",
       "      <td>White</td>\n",
       "      <td>213095.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>$3,500.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>Toyota</td>\n",
       "      <td>Green</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>$4,500.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>Honda</td>\n",
       "      <td>Blue</td>\n",
       "      <td>45698.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>Honda</td>\n",
       "      <td>NaN</td>\n",
       "      <td>54738.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>$7,000.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>Toyota</td>\n",
       "      <td>White</td>\n",
       "      <td>60000.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>Nissan</td>\n",
       "      <td>White</td>\n",
       "      <td>31600.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>$9,700.00</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     Make Colour  Odometer (KM)  Doors       Price\n",
       "0  Toyota  White       150043.0    4.0  $4,000.00 \n",
       "1   Honda    Red        87899.0    4.0  $5,000.00 \n",
       "2  Toyota   Blue        32549.0    NaN  $7,000.00 \n",
       "3     BMW  Black        11179.0    5.0         NaN\n",
       "4  Nissan  White       213095.0    NaN  $3,500.00 \n",
       "5  Toyota  Green            NaN    NaN  $4,500.00 \n",
       "6   Honda   Blue        45698.0    4.0         NaN\n",
       "7   Honda    NaN        54738.0    4.0  $7,000.00 \n",
       "8  Toyota  White        60000.0    4.0         NaN\n",
       "9  Nissan  White        31600.0    4.0  $9,700.00 "
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "car_sales_missing = pd.read_csv('car-sales-export.csv')\n",
    "car_sales_missing"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Make</th>\n",
       "      <th>Colour</th>\n",
       "      <th>Odometer (KM)</th>\n",
       "      <th>Doors</th>\n",
       "      <th>Price</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Toyota</td>\n",
       "      <td>White</td>\n",
       "      <td>150043.000000</td>\n",
       "      <td>4.0</td>\n",
       "      <td>$4,000.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Honda</td>\n",
       "      <td>Red</td>\n",
       "      <td>87899.000000</td>\n",
       "      <td>4.0</td>\n",
       "      <td>$5,000.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Toyota</td>\n",
       "      <td>Blue</td>\n",
       "      <td>32549.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>$7,000.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>BMW</td>\n",
       "      <td>Black</td>\n",
       "      <td>11179.000000</td>\n",
       "      <td>5.0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Nissan</td>\n",
       "      <td>White</td>\n",
       "      <td>213095.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>$3,500.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>Toyota</td>\n",
       "      <td>Green</td>\n",
       "      <td>76311.222222</td>\n",
       "      <td>NaN</td>\n",
       "      <td>$4,500.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>Honda</td>\n",
       "      <td>Blue</td>\n",
       "      <td>45698.000000</td>\n",
       "      <td>4.0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>Honda</td>\n",
       "      <td>NaN</td>\n",
       "      <td>54738.000000</td>\n",
       "      <td>4.0</td>\n",
       "      <td>$7,000.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>Toyota</td>\n",
       "      <td>White</td>\n",
       "      <td>60000.000000</td>\n",
       "      <td>4.0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>Nissan</td>\n",
       "      <td>White</td>\n",
       "      <td>31600.000000</td>\n",
       "      <td>4.0</td>\n",
       "      <td>$9,700.00</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     Make Colour  Odometer (KM)  Doors       Price\n",
       "0  Toyota  White  150043.000000    4.0  $4,000.00 \n",
       "1   Honda    Red   87899.000000    4.0  $5,000.00 \n",
       "2  Toyota   Blue   32549.000000    NaN  $7,000.00 \n",
       "3     BMW  Black   11179.000000    5.0         NaN\n",
       "4  Nissan  White  213095.000000    NaN  $3,500.00 \n",
       "5  Toyota  Green   76311.222222    NaN  $4,500.00 \n",
       "6   Honda   Blue   45698.000000    4.0         NaN\n",
       "7   Honda    NaN   54738.000000    4.0  $7,000.00 \n",
       "8  Toyota  White   60000.000000    4.0         NaN\n",
       "9  Nissan  White   31600.000000    4.0  $9,700.00 "
      ]
     },
     "execution_count": 35,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "car_sales_missing[\"Odometer (KM)\"].fillna(car_sales_missing[\"Odometer (KM)\"].mean(), inplace=True)\n",
    "car_sales_missing"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Odometer的缺失值确实已经被处理了，可问题是Doors和Price中还有缺失值，这又该怎么办？比如，我们这次就不想处理了，希望将所有包含缺失值所在行的数据丢掉，该怎么办？"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Make</th>\n",
       "      <th>Colour</th>\n",
       "      <th>Odometer (KM)</th>\n",
       "      <th>Doors</th>\n",
       "      <th>Price</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Toyota</td>\n",
       "      <td>White</td>\n",
       "      <td>150043.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>$4,000.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Honda</td>\n",
       "      <td>Red</td>\n",
       "      <td>87899.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>$5,000.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>Nissan</td>\n",
       "      <td>White</td>\n",
       "      <td>31600.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>$9,700.00</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     Make Colour  Odometer (KM)  Doors       Price\n",
       "0  Toyota  White       150043.0    4.0  $4,000.00 \n",
       "1   Honda    Red        87899.0    4.0  $5,000.00 \n",
       "9  Nissan  White        31600.0    4.0  $9,700.00 "
      ]
     },
     "execution_count": 36,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "car_sales_missing.dropna()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Make</th>\n",
       "      <th>Colour</th>\n",
       "      <th>Odometer (KM)</th>\n",
       "      <th>Doors</th>\n",
       "      <th>Price</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Toyota</td>\n",
       "      <td>White</td>\n",
       "      <td>150043.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>$4,000.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Honda</td>\n",
       "      <td>Red</td>\n",
       "      <td>87899.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>$5,000.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>Nissan</td>\n",
       "      <td>White</td>\n",
       "      <td>31600.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>$9,700.00</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     Make Colour  Odometer (KM)  Doors       Price\n",
       "0  Toyota  White       150043.0    4.0  $4,000.00 \n",
       "1   Honda    Red        87899.0    4.0  $5,000.00 \n",
       "9  Nissan  White        31600.0    4.0  $9,700.00 "
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "car_sales_missing_dropped = car_sales_missing.dropna()\n",
    "car_sales_missing_dropped"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [],
   "source": [
    "car_sales_missing_dropped.to_csv('car-sales-export-dropped.csv')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "昨天，我们讲解了如何通过fillna处理缺失值，今天我们继续学习Pandas，看看如何通过series、list和value来添加新列。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Make</th>\n",
       "      <th>Colour</th>\n",
       "      <th>Odometer (KM)</th>\n",
       "      <th>Doors</th>\n",
       "      <th>Price</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>toyota</td>\n",
       "      <td>White</td>\n",
       "      <td>150043</td>\n",
       "      <td>4</td>\n",
       "      <td>400000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>honda</td>\n",
       "      <td>Red</td>\n",
       "      <td>87899</td>\n",
       "      <td>4</td>\n",
       "      <td>500000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>toyota</td>\n",
       "      <td>Blue</td>\n",
       "      <td>32549</td>\n",
       "      <td>3</td>\n",
       "      <td>700000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>bmw</td>\n",
       "      <td>Black</td>\n",
       "      <td>11179</td>\n",
       "      <td>5</td>\n",
       "      <td>2200000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>nissan</td>\n",
       "      <td>White</td>\n",
       "      <td>213095</td>\n",
       "      <td>4</td>\n",
       "      <td>350000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>toyota</td>\n",
       "      <td>Green</td>\n",
       "      <td>99213</td>\n",
       "      <td>4</td>\n",
       "      <td>450000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>honda</td>\n",
       "      <td>Blue</td>\n",
       "      <td>45698</td>\n",
       "      <td>4</td>\n",
       "      <td>750000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>honda</td>\n",
       "      <td>Blue</td>\n",
       "      <td>54738</td>\n",
       "      <td>4</td>\n",
       "      <td>700000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>toyota</td>\n",
       "      <td>White</td>\n",
       "      <td>60000</td>\n",
       "      <td>4</td>\n",
       "      <td>625000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>nissan</td>\n",
       "      <td>White</td>\n",
       "      <td>31600</td>\n",
       "      <td>4</td>\n",
       "      <td>970000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     Make Colour  Odometer (KM)  Doors    Price\n",
       "0  toyota  White         150043      4   400000\n",
       "1   honda    Red          87899      4   500000\n",
       "2  toyota   Blue          32549      3   700000\n",
       "3     bmw  Black          11179      5  2200000\n",
       "4  nissan  White         213095      4   350000\n",
       "5  toyota  Green          99213      4   450000\n",
       "6   honda   Blue          45698      4   750000\n",
       "7   honda   Blue          54738      4   700000\n",
       "8  toyota  White          60000      4   625000\n",
       "9  nissan  White          31600      4   970000"
      ]
     },
     "execution_count": 41,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "car_sales"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "目前，在car_sales中，一共有5列数据，如果现在我们想添加名为seats的一列，用来表示座位数量，该如何操作呢？"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "通过 Series 创建 column"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [],
   "source": [
    "seats_column = pd.Series([5,5,5,5,5])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "添加一个seats的新列"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Make</th>\n",
       "      <th>Colour</th>\n",
       "      <th>Odometer (KM)</th>\n",
       "      <th>Doors</th>\n",
       "      <th>Price</th>\n",
       "      <th>Seats</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>toyota</td>\n",
       "      <td>White</td>\n",
       "      <td>150043</td>\n",
       "      <td>4</td>\n",
       "      <td>400000</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>honda</td>\n",
       "      <td>Red</td>\n",
       "      <td>87899</td>\n",
       "      <td>4</td>\n",
       "      <td>500000</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>toyota</td>\n",
       "      <td>Blue</td>\n",
       "      <td>32549</td>\n",
       "      <td>3</td>\n",
       "      <td>700000</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>bmw</td>\n",
       "      <td>Black</td>\n",
       "      <td>11179</td>\n",
       "      <td>5</td>\n",
       "      <td>2200000</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>nissan</td>\n",
       "      <td>White</td>\n",
       "      <td>213095</td>\n",
       "      <td>4</td>\n",
       "      <td>350000</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>toyota</td>\n",
       "      <td>Green</td>\n",
       "      <td>99213</td>\n",
       "      <td>4</td>\n",
       "      <td>450000</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>honda</td>\n",
       "      <td>Blue</td>\n",
       "      <td>45698</td>\n",
       "      <td>4</td>\n",
       "      <td>750000</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>honda</td>\n",
       "      <td>Blue</td>\n",
       "      <td>54738</td>\n",
       "      <td>4</td>\n",
       "      <td>700000</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>toyota</td>\n",
       "      <td>White</td>\n",
       "      <td>60000</td>\n",
       "      <td>4</td>\n",
       "      <td>625000</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>nissan</td>\n",
       "      <td>White</td>\n",
       "      <td>31600</td>\n",
       "      <td>4</td>\n",
       "      <td>970000</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     Make Colour  Odometer (KM)  Doors    Price  Seats\n",
       "0  toyota  White         150043      4   400000    5.0\n",
       "1   honda    Red          87899      4   500000    5.0\n",
       "2  toyota   Blue          32549      3   700000    5.0\n",
       "3     bmw  Black          11179      5  2200000    5.0\n",
       "4  nissan  White         213095      4   350000    5.0\n",
       "5  toyota  Green          99213      4   450000    NaN\n",
       "6   honda   Blue          45698      4   750000    NaN\n",
       "7   honda   Blue          54738      4   700000    NaN\n",
       "8  toyota  White          60000      4   625000    NaN\n",
       "9  nissan  White          31600      4   970000    NaN"
      ]
     },
     "execution_count": 45,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "car_sales[\"Seats\"] = seats_column\n",
    "car_sales"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "第一、通过pd.Series方法，我们定义一个名为seat_column的一列；"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "我们将seat_column添加到car_sales[\"seats\"]这一列上；"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "因为seat_column只有5个数据，所以我们发现car_sales的seats列上只有5个数据，剩下的都是NaN；"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Make</th>\n",
       "      <th>Colour</th>\n",
       "      <th>Odometer (KM)</th>\n",
       "      <th>Doors</th>\n",
       "      <th>Price</th>\n",
       "      <th>Seats</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>toyota</td>\n",
       "      <td>White</td>\n",
       "      <td>150043</td>\n",
       "      <td>4</td>\n",
       "      <td>400000</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>honda</td>\n",
       "      <td>Red</td>\n",
       "      <td>87899</td>\n",
       "      <td>4</td>\n",
       "      <td>500000</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>toyota</td>\n",
       "      <td>Blue</td>\n",
       "      <td>32549</td>\n",
       "      <td>3</td>\n",
       "      <td>700000</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>bmw</td>\n",
       "      <td>Black</td>\n",
       "      <td>11179</td>\n",
       "      <td>5</td>\n",
       "      <td>2200000</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>nissan</td>\n",
       "      <td>White</td>\n",
       "      <td>213095</td>\n",
       "      <td>4</td>\n",
       "      <td>350000</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>toyota</td>\n",
       "      <td>Green</td>\n",
       "      <td>99213</td>\n",
       "      <td>4</td>\n",
       "      <td>450000</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>honda</td>\n",
       "      <td>Blue</td>\n",
       "      <td>45698</td>\n",
       "      <td>4</td>\n",
       "      <td>750000</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>honda</td>\n",
       "      <td>Blue</td>\n",
       "      <td>54738</td>\n",
       "      <td>4</td>\n",
       "      <td>700000</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>toyota</td>\n",
       "      <td>White</td>\n",
       "      <td>60000</td>\n",
       "      <td>4</td>\n",
       "      <td>625000</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>nissan</td>\n",
       "      <td>White</td>\n",
       "      <td>31600</td>\n",
       "      <td>4</td>\n",
       "      <td>970000</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     Make Colour  Odometer (KM)  Doors    Price  Seats\n",
       "0  toyota  White         150043      4   400000    5.0\n",
       "1   honda    Red          87899      4   500000    5.0\n",
       "2  toyota   Blue          32549      3   700000    5.0\n",
       "3     bmw  Black          11179      5  2200000    5.0\n",
       "4  nissan  White         213095      4   350000    5.0\n",
       "5  toyota  Green          99213      4   450000    5.0\n",
       "6   honda   Blue          45698      4   750000    5.0\n",
       "7   honda   Blue          54738      4   700000    5.0\n",
       "8  toyota  White          60000      4   625000    5.0\n",
       "9  nissan  White          31600      4   970000    5.0"
      ]
     },
     "execution_count": 46,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "car_sales[\"Seats\"].fillna(5, inplace=True)\n",
    "car_sales"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {},
   "outputs": [],
   "source": [
    "fuel_economy = [7.5,9.2,5.0,9.6,8.7,4.7,5.3,6.8,7.9,6.6]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Make</th>\n",
       "      <th>Colour</th>\n",
       "      <th>Odometer (KM)</th>\n",
       "      <th>Doors</th>\n",
       "      <th>Price</th>\n",
       "      <th>Seats</th>\n",
       "      <th>Fuel per 100KM</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>toyota</td>\n",
       "      <td>White</td>\n",
       "      <td>150043</td>\n",
       "      <td>4</td>\n",
       "      <td>400000</td>\n",
       "      <td>5.0</td>\n",
       "      <td>7.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>honda</td>\n",
       "      <td>Red</td>\n",
       "      <td>87899</td>\n",
       "      <td>4</td>\n",
       "      <td>500000</td>\n",
       "      <td>5.0</td>\n",
       "      <td>9.2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>toyota</td>\n",
       "      <td>Blue</td>\n",
       "      <td>32549</td>\n",
       "      <td>3</td>\n",
       "      <td>700000</td>\n",
       "      <td>5.0</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>bmw</td>\n",
       "      <td>Black</td>\n",
       "      <td>11179</td>\n",
       "      <td>5</td>\n",
       "      <td>2200000</td>\n",
       "      <td>5.0</td>\n",
       "      <td>9.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>nissan</td>\n",
       "      <td>White</td>\n",
       "      <td>213095</td>\n",
       "      <td>4</td>\n",
       "      <td>350000</td>\n",
       "      <td>5.0</td>\n",
       "      <td>8.7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>toyota</td>\n",
       "      <td>Green</td>\n",
       "      <td>99213</td>\n",
       "      <td>4</td>\n",
       "      <td>450000</td>\n",
       "      <td>5.0</td>\n",
       "      <td>4.7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>honda</td>\n",
       "      <td>Blue</td>\n",
       "      <td>45698</td>\n",
       "      <td>4</td>\n",
       "      <td>750000</td>\n",
       "      <td>5.0</td>\n",
       "      <td>5.3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>honda</td>\n",
       "      <td>Blue</td>\n",
       "      <td>54738</td>\n",
       "      <td>4</td>\n",
       "      <td>700000</td>\n",
       "      <td>5.0</td>\n",
       "      <td>6.8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>toyota</td>\n",
       "      <td>White</td>\n",
       "      <td>60000</td>\n",
       "      <td>4</td>\n",
       "      <td>625000</td>\n",
       "      <td>5.0</td>\n",
       "      <td>7.9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>nissan</td>\n",
       "      <td>White</td>\n",
       "      <td>31600</td>\n",
       "      <td>4</td>\n",
       "      <td>970000</td>\n",
       "      <td>5.0</td>\n",
       "      <td>6.6</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     Make Colour  Odometer (KM)  Doors    Price  Seats  Fuel per 100KM\n",
       "0  toyota  White         150043      4   400000    5.0             7.5\n",
       "1   honda    Red          87899      4   500000    5.0             9.2\n",
       "2  toyota   Blue          32549      3   700000    5.0             5.0\n",
       "3     bmw  Black          11179      5  2200000    5.0             9.6\n",
       "4  nissan  White         213095      4   350000    5.0             8.7\n",
       "5  toyota  Green          99213      4   450000    5.0             4.7\n",
       "6   honda   Blue          45698      4   750000    5.0             5.3\n",
       "7   honda   Blue          54738      4   700000    5.0             6.8\n",
       "8  toyota  White          60000      4   625000    5.0             7.9\n",
       "9  nissan  White          31600      4   970000    5.0             6.6"
      ]
     },
     "execution_count": 49,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "car_sales[\"Fuel per 100KM\"] = fuel_economy\n",
    "car_sales"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Make</th>\n",
       "      <th>Colour</th>\n",
       "      <th>Odometer (KM)</th>\n",
       "      <th>Doors</th>\n",
       "      <th>Price</th>\n",
       "      <th>Seats</th>\n",
       "      <th>Fuel per 100KM</th>\n",
       "      <th>Passed road saftey</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>toyota</td>\n",
       "      <td>White</td>\n",
       "      <td>150043</td>\n",
       "      <td>4</td>\n",
       "      <td>400000</td>\n",
       "      <td>5.0</td>\n",
       "      <td>7.5</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>honda</td>\n",
       "      <td>Red</td>\n",
       "      <td>87899</td>\n",
       "      <td>4</td>\n",
       "      <td>500000</td>\n",
       "      <td>5.0</td>\n",
       "      <td>9.2</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>toyota</td>\n",
       "      <td>Blue</td>\n",
       "      <td>32549</td>\n",
       "      <td>3</td>\n",
       "      <td>700000</td>\n",
       "      <td>5.0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>bmw</td>\n",
       "      <td>Black</td>\n",
       "      <td>11179</td>\n",
       "      <td>5</td>\n",
       "      <td>2200000</td>\n",
       "      <td>5.0</td>\n",
       "      <td>9.6</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>nissan</td>\n",
       "      <td>White</td>\n",
       "      <td>213095</td>\n",
       "      <td>4</td>\n",
       "      <td>350000</td>\n",
       "      <td>5.0</td>\n",
       "      <td>8.7</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>toyota</td>\n",
       "      <td>Green</td>\n",
       "      <td>99213</td>\n",
       "      <td>4</td>\n",
       "      <td>450000</td>\n",
       "      <td>5.0</td>\n",
       "      <td>4.7</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>honda</td>\n",
       "      <td>Blue</td>\n",
       "      <td>45698</td>\n",
       "      <td>4</td>\n",
       "      <td>750000</td>\n",
       "      <td>5.0</td>\n",
       "      <td>5.3</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>honda</td>\n",
       "      <td>Blue</td>\n",
       "      <td>54738</td>\n",
       "      <td>4</td>\n",
       "      <td>700000</td>\n",
       "      <td>5.0</td>\n",
       "      <td>6.8</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>toyota</td>\n",
       "      <td>White</td>\n",
       "      <td>60000</td>\n",
       "      <td>4</td>\n",
       "      <td>625000</td>\n",
       "      <td>5.0</td>\n",
       "      <td>7.9</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>nissan</td>\n",
       "      <td>White</td>\n",
       "      <td>31600</td>\n",
       "      <td>4</td>\n",
       "      <td>970000</td>\n",
       "      <td>5.0</td>\n",
       "      <td>6.6</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     Make Colour  Odometer (KM)  Doors    Price  Seats  Fuel per 100KM  \\\n",
       "0  toyota  White         150043      4   400000    5.0             7.5   \n",
       "1   honda    Red          87899      4   500000    5.0             9.2   \n",
       "2  toyota   Blue          32549      3   700000    5.0             5.0   \n",
       "3     bmw  Black          11179      5  2200000    5.0             9.6   \n",
       "4  nissan  White         213095      4   350000    5.0             8.7   \n",
       "5  toyota  Green          99213      4   450000    5.0             4.7   \n",
       "6   honda   Blue          45698      4   750000    5.0             5.3   \n",
       "7   honda   Blue          54738      4   700000    5.0             6.8   \n",
       "8  toyota  White          60000      4   625000    5.0             7.9   \n",
       "9  nissan  White          31600      4   970000    5.0             6.6   \n",
       "\n",
       "   Passed road saftey  \n",
       "0                True  \n",
       "1                True  \n",
       "2                True  \n",
       "3                True  \n",
       "4                True  \n",
       "5                True  \n",
       "6                True  \n",
       "7                True  \n",
       "8                True  \n",
       "9                True  "
      ]
     },
     "execution_count": 50,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "car_sales[\"Passed road saftey\"] = True\n",
    "car_sales"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "有这样一种情况，比如我们手中的csv数据有百万条记录，可是我们在测试的过程中，却并不想用这么多，该怎么办？"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 61,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Make</th>\n",
       "      <th>Colour</th>\n",
       "      <th>Odometer (KM)</th>\n",
       "      <th>Doors</th>\n",
       "      <th>Price</th>\n",
       "      <th>Seats</th>\n",
       "      <th>Fuel per 100KM</th>\n",
       "      <th>Passed road saftey</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>toyota</td>\n",
       "      <td>Blue</td>\n",
       "      <td>32549</td>\n",
       "      <td>3</td>\n",
       "      <td>700000</td>\n",
       "      <td>5.0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>toyota</td>\n",
       "      <td>White</td>\n",
       "      <td>60000</td>\n",
       "      <td>4</td>\n",
       "      <td>625000</td>\n",
       "      <td>5.0</td>\n",
       "      <td>7.9</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>honda</td>\n",
       "      <td>Blue</td>\n",
       "      <td>54738</td>\n",
       "      <td>4</td>\n",
       "      <td>700000</td>\n",
       "      <td>5.0</td>\n",
       "      <td>6.8</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>bmw</td>\n",
       "      <td>Black</td>\n",
       "      <td>11179</td>\n",
       "      <td>5</td>\n",
       "      <td>2200000</td>\n",
       "      <td>5.0</td>\n",
       "      <td>9.6</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>toyota</td>\n",
       "      <td>Green</td>\n",
       "      <td>99213</td>\n",
       "      <td>4</td>\n",
       "      <td>450000</td>\n",
       "      <td>5.0</td>\n",
       "      <td>4.7</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     Make Colour  Odometer (KM)  Doors    Price  Seats  Fuel per 100KM  \\\n",
       "2  toyota   Blue          32549      3   700000    5.0             5.0   \n",
       "8  toyota  White          60000      4   625000    5.0             7.9   \n",
       "7   honda   Blue          54738      4   700000    5.0             6.8   \n",
       "3     bmw  Black          11179      5  2200000    5.0             9.6   \n",
       "5  toyota  Green          99213      4   450000    5.0             4.7   \n",
       "\n",
       "   Passed road saftey  \n",
       "2                True  \n",
       "8                True  \n",
       "7                True  \n",
       "3                True  \n",
       "5                True  "
      ]
     },
     "execution_count": 61,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "car_sales_shuffled = car_sales.sample(frac=0.5)\n",
    "car_sales_shuffled"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "其中，有一点需要注意的就是，通过index索引可以看出来，输出的结果是乱序的。没错，sample方法就是有shuffle乱序的作用。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 62,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Make</th>\n",
       "      <th>Colour</th>\n",
       "      <th>Odometer (KM)</th>\n",
       "      <th>Doors</th>\n",
       "      <th>Price</th>\n",
       "      <th>Seats</th>\n",
       "      <th>Fuel per 100KM</th>\n",
       "      <th>Passed road saftey</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>toyota</td>\n",
       "      <td>Blue</td>\n",
       "      <td>32549</td>\n",
       "      <td>3</td>\n",
       "      <td>700000</td>\n",
       "      <td>5.0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>toyota</td>\n",
       "      <td>White</td>\n",
       "      <td>60000</td>\n",
       "      <td>4</td>\n",
       "      <td>625000</td>\n",
       "      <td>5.0</td>\n",
       "      <td>7.9</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>honda</td>\n",
       "      <td>Blue</td>\n",
       "      <td>54738</td>\n",
       "      <td>4</td>\n",
       "      <td>700000</td>\n",
       "      <td>5.0</td>\n",
       "      <td>6.8</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>bmw</td>\n",
       "      <td>Black</td>\n",
       "      <td>11179</td>\n",
       "      <td>5</td>\n",
       "      <td>2200000</td>\n",
       "      <td>5.0</td>\n",
       "      <td>9.6</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>toyota</td>\n",
       "      <td>Green</td>\n",
       "      <td>99213</td>\n",
       "      <td>4</td>\n",
       "      <td>450000</td>\n",
       "      <td>5.0</td>\n",
       "      <td>4.7</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     Make Colour  Odometer (KM)  Doors    Price  Seats  Fuel per 100KM  \\\n",
       "0  toyota   Blue          32549      3   700000    5.0             5.0   \n",
       "1  toyota  White          60000      4   625000    5.0             7.9   \n",
       "2   honda   Blue          54738      4   700000    5.0             6.8   \n",
       "3     bmw  Black          11179      5  2200000    5.0             9.6   \n",
       "4  toyota  Green          99213      4   450000    5.0             4.7   \n",
       "\n",
       "   Passed road saftey  \n",
       "0                True  \n",
       "1                True  \n",
       "2                True  \n",
       "3                True  \n",
       "4                True  "
      ]
     },
     "execution_count": 62,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "car_sales_shuffled.reset_index(drop=True, inplace=True)\n",
    "car_sales_shuffled"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "最后介绍好用的apply函数，它可以将某一个函数，作用于DataFrame的某一列上。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 63,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Make</th>\n",
       "      <th>Colour</th>\n",
       "      <th>Odometer (KM)</th>\n",
       "      <th>Doors</th>\n",
       "      <th>Price</th>\n",
       "      <th>Seats</th>\n",
       "      <th>Fuel per 100KM</th>\n",
       "      <th>Passed road saftey</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>toyota</td>\n",
       "      <td>White</td>\n",
       "      <td>75021.5</td>\n",
       "      <td>4</td>\n",
       "      <td>400000</td>\n",
       "      <td>5.0</td>\n",
       "      <td>7.5</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>honda</td>\n",
       "      <td>Red</td>\n",
       "      <td>43949.5</td>\n",
       "      <td>4</td>\n",
       "      <td>500000</td>\n",
       "      <td>5.0</td>\n",
       "      <td>9.2</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>toyota</td>\n",
       "      <td>Blue</td>\n",
       "      <td>16274.5</td>\n",
       "      <td>3</td>\n",
       "      <td>700000</td>\n",
       "      <td>5.0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>bmw</td>\n",
       "      <td>Black</td>\n",
       "      <td>5589.5</td>\n",
       "      <td>5</td>\n",
       "      <td>2200000</td>\n",
       "      <td>5.0</td>\n",
       "      <td>9.6</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>nissan</td>\n",
       "      <td>White</td>\n",
       "      <td>106547.5</td>\n",
       "      <td>4</td>\n",
       "      <td>350000</td>\n",
       "      <td>5.0</td>\n",
       "      <td>8.7</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>toyota</td>\n",
       "      <td>Green</td>\n",
       "      <td>49606.5</td>\n",
       "      <td>4</td>\n",
       "      <td>450000</td>\n",
       "      <td>5.0</td>\n",
       "      <td>4.7</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>honda</td>\n",
       "      <td>Blue</td>\n",
       "      <td>22849.0</td>\n",
       "      <td>4</td>\n",
       "      <td>750000</td>\n",
       "      <td>5.0</td>\n",
       "      <td>5.3</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>honda</td>\n",
       "      <td>Blue</td>\n",
       "      <td>27369.0</td>\n",
       "      <td>4</td>\n",
       "      <td>700000</td>\n",
       "      <td>5.0</td>\n",
       "      <td>6.8</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>toyota</td>\n",
       "      <td>White</td>\n",
       "      <td>30000.0</td>\n",
       "      <td>4</td>\n",
       "      <td>625000</td>\n",
       "      <td>5.0</td>\n",
       "      <td>7.9</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>nissan</td>\n",
       "      <td>White</td>\n",
       "      <td>15800.0</td>\n",
       "      <td>4</td>\n",
       "      <td>970000</td>\n",
       "      <td>5.0</td>\n",
       "      <td>6.6</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     Make Colour  Odometer (KM)  Doors    Price  Seats  Fuel per 100KM  \\\n",
       "0  toyota  White        75021.5      4   400000    5.0             7.5   \n",
       "1   honda    Red        43949.5      4   500000    5.0             9.2   \n",
       "2  toyota   Blue        16274.5      3   700000    5.0             5.0   \n",
       "3     bmw  Black         5589.5      5  2200000    5.0             9.6   \n",
       "4  nissan  White       106547.5      4   350000    5.0             8.7   \n",
       "5  toyota  Green        49606.5      4   450000    5.0             4.7   \n",
       "6   honda   Blue        22849.0      4   750000    5.0             5.3   \n",
       "7   honda   Blue        27369.0      4   700000    5.0             6.8   \n",
       "8  toyota  White        30000.0      4   625000    5.0             7.9   \n",
       "9  nissan  White        15800.0      4   970000    5.0             6.6   \n",
       "\n",
       "   Passed road saftey  \n",
       "0                True  \n",
       "1                True  \n",
       "2                True  \n",
       "3                True  \n",
       "4                True  \n",
       "5                True  \n",
       "6                True  \n",
       "7                True  \n",
       "8                True  \n",
       "9                True  "
      ]
     },
     "execution_count": 63,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "car_sales[\"Odometer (KM)\"] = car_sales[\"Odometer (KM)\"].apply(lambda x: x / 2)\n",
    "car_sales"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "interpreter": {
   "hash": "f0eadef1d77f15b2dc417c8cc1a73e43ff71cc62600b9af0dbbd14bf3385942a"
  },
  "kernelspec": {
   "display_name": "Python 3.9.12",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.12"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
